package com.atm.thirdplt.common.constant;

/**
 * 通用常量信息
 *
 * @author atm
 */
public class Constants {
    /** UTF-8 字符集 */
    public static final String UTF8 = "UTF-8";

    /** GBK 字符集 */
    public static final String GBK = "GBK";

    /** http请求 */
    public static final String HTTP = "http://";

    /** https请求 */
    public static final String HTTPS = "https://";

    /** 通用成功标识 */
    public static final String SUCCESS = "0";

    /** 通用失败标识 */
    public static final String FAIL = "1";

    /** 登录成功 */
    public static final String LOGIN_SUCCESS = "Success";

    /** 注销 */
    public static final String LOGOUT = "Logout";

    /** 登录失败 */
    public static final String LOGIN_FAIL = "Error";

    /** 验证码 redis key */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /** 登录用户 redis key */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /** 防重提交 redis key */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /** 验证码有效期（分钟） */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /** 令牌 */
    public static final String TOKEN = "token";

    /** 令牌前缀 */
    public static final String TOKEN_PREFIX = "Bearer ";

    /** 令牌前缀 */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /** 用户ID */
    public static final String JWT_USERID = "userid";

    /** 用户名称 */
    public static final String JWT_USERNAME = "sub";

    /** 用户头像 */
    public static final String JWT_AVATAR = "avatar";

    /** 创建时间 */
    public static final String JWT_CREATED = "created";

    /** 用户权限 */
    public static final String JWT_AUTHORITIES = "authorities";

    /** 参数管理 cache key */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /** 字典管理 cache key */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /** 资源映射路径 前缀 */
    public static final String RESOURCE_PREFIX = "/profile";

    /** 平台类型 用户平台 */
    public static final Integer PLATFORM_USER = 0;
    /** 平台类型 管理平台 */
    public static final Integer PLATFORM_MANAGE = 1;

    /** 1、his科室字典 2、his人员字典 */
    public static final int HIS_DEPT = 1;

    public static final int HIS_USERS = 2;

    /** 手术安排紧急类型 0:择期，1：急诊 */
    public static final int OPER_TIME_SEL = 0;

    public static final int OPER_TIME_EMERGENCY = 1;


    /** 手术预约表状态 */
    public static final int OPER_SCHE_NEW = 0;

    public static final int OPER_SCHE_CANCEL = -1;

    /** 人员是否同步状态 */
    public static final int USER_SYNC_NO = 1;

    public static final int USER_SYNC_YES = 2;

    /** 手术单状态 0：默认未排班 ，1：已提交，2：已提交 */
    public static final int OPERATION_COM = 2;

    /**
     * 手术阶段状态0术前；5入手术室；10麻醉开始；15手术开始；
     * 25手术结束；30麻醉结束；35出手术室；40待复苏；45入复苏室；55出复苏室；60进入病房； 手术麻醉表 转入ICU:65
     * -80：手术取消
     */
    public static final int OPERATION_STAGE_BEFORE = 0;

    /**
     * 中联业务接口分类定义 1：科室，2：工作人员，3：手术申请预约，4：手术名称，5：病人基本信息，6：病人在院信息,8：手术字典
     * 9：检验主记录，10：检验明细记录
     */
    public static final int WS_ZL_BUS_DEPT = 1;
    public static final int WS_ZL_BUS_USER = 2;
    public static final int WS_ZL_BUS_OPERSCHE = 3;
    public static final int WS_ZL_BUS_OPERNAME = 4;
    public static final int WS_ZL_BUS_PATINF = 5;
    public static final int WS_ZL_BUS_PATINHOS = 6;
    public static final int WS_ZL_BUS_OPERDIC = 8;
    public static final int WS_ZL_BUS_LABMASTER = 9;
    public static final int WS_ZL_BUS_LABRESULT = 10;

    /**
     * 科室是否再用，His端标识,0：所有，1：在用
     */
    public static final int HIS_DEPT_USEFLAG_ON = 1;
    public static final int HIS_DEPT_USEFLAG_ALL = 0;

    /**
     * 数据同步方式,1：视图，2：贵州中联ws V1.4.4 ，3：重庆中联http 0526
     */
    public static final String SYNC_DATA_VIEW = "1";
    public static final String SYNC_DATA_ZLGZWS = "2";
    public static final String SYNC_DATA_ZLCQHTTP = "3";

    /**
     * 在院信息查询方式,1：通过patientId查询 ，2：通过住院号查询
     */
    public static final String PAT_IN_HOS_PARAM_PATID = "1";
    public static final String PAT_IN_HOS_PARAM_INPNO = "2";

    public static final String SYS_CTL_SYNC_FLAG_CODE = "syncFlag";

    public static final String SYS_CTL_SYNC_FLAG_VAL_ACTIVE = "active";
    public static final String SYS_CTL_SYNC_FLAG_VAL_SLEEP = "sleep";

    /**
     * 同步返回标识,1：同步成功 ，2：正在同步，3：同步失败
     */
    public static final String SYNC_STATUS_SUCCESS = "1";
    public static final String SYNC_STATUS_ACTIVE = "2";
    public static final String SYNC_STATUS_FIAL = "3";

    /**
     * CA自动签名参数 版本号  算法  原文类型
     *
     */
    public static final String CA_PARM_VERSION = "1.0";
    public static final String CA_PARM_SIGNALGO = "HMAC";
    public static final String CA_PARM_DATATYPE = "DATA";
    public static final String CA_PARM_ALGO = "SM3withSM2";

    /**
     * CA自动签名地址
     *
     */
    public static final String CA_URL_SIGN_JOB = "/coss/service/v1/addSignJob";

    public static final String CA_URL_START_AUTO_SIGN = "/coss/service/v1/startAutoSign";

    public static final String CA_URL_GET_SIGN_RESULT = "/coss/service/v1/getSignResult";

    public static final String CA_URL_QUERY_IMAGE = "/coss/service/v1/queryImage";

}
